package so.sao.code.service.infrastructure.enums;

import so.sao.top.core.util.enums.NamedEnumEntity;

public enum PrintFileFormatStatus implements NamedEnumEntity<Integer> {
	ToDo(1, "未设置"), Done(2, "已设置"), Downloaded(3, "已下载");

	private Integer id;
	private String name;

	private PrintFileFormatStatus(Integer id, String name) {
		this.id = id;
		this.name = name;
	}

	@Override
	public Integer getValue() {
		return id;
	}

	@Override
	public String getName() {
		return name;
	}

	public static PrintFileFormatStatus fromValue(Integer id) {
		switch (id) {
		case 1:
			return ToDo;
		case 2:
			return Done;
		case 3:
			return Downloaded;
		default:
			throw new IllegalArgumentException("Value [" + id + "] not support!");
		}
	}
}
